package com.zmy.xcx.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zmy.xcx.dao.entity.HyperglycemiaRiskAssessmentDO;
import com.zmy.xcx.dao.mapper.HyperglycemiaRiskAssessmentMapper;
import com.zmy.xcx.dto.HyperglycemiaRiskAssessmentDTO;
import com.zmy.xcx.service.HyperglycemiaRiskAssessmentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class HyperglycemiaRiskAssessmentServiceImpl extends ServiceImpl<HyperglycemiaRiskAssessmentMapper, HyperglycemiaRiskAssessmentDO> implements HyperglycemiaRiskAssessmentService {

    @Override
    public void addRiskAssessmentInfo(HyperglycemiaRiskAssessmentDTO hyperglycemiaRiskAssessmentDTO) {
        HyperglycemiaRiskAssessmentDO hyperglycemiaRiskAssessmentDO = BeanUtil.toBean(hyperglycemiaRiskAssessmentDTO, HyperglycemiaRiskAssessmentDO.class);
        hyperglycemiaRiskAssessmentDO.setOpenid("100");
        baseMapper.insert(hyperglycemiaRiskAssessmentDO);
    }
}
